package com.gegao.calc.operator;

/**
 * Created by zhangzhanzhong on 2015/12/23.
 */
public class DivOperator implements Operator {
    @Override
    public int getResult(int num1, int num2) throws Exception {
        if (num1 != 0)
            return num1 / num2;
        else
            throw new Exception("The dividend cannot be zore");
    }
}
